
<?php
    if($msg=$session->flash()){
        echo '<center>'.$msg.'</center>
        
        <script type="text/javascript">
            
            setInterval(function (){
            
                parent.$.fancybox.close();
            },2000)
            
        </script>
        ';
    }
    else {
        echo $form->create('MyEmail',array('url'=>$html->url(null,true)));
        
        if($type!='to-admin')
            echo $form->input('to');
        
        echo $form->input('from');
        if($type=='to-admin')
            echo $form->input('subject');
        echo $form->input('body',array('type'=>'textarea'));
        echo $form->end('Send');
    }
?>